home *** CD-ROM | disk | FTP | other *** search
/ STraTOS 1997 April & May / STraTOS 1 - 1997 April & May.iso / CD01 / PRGMANIA / @FALCON / QDSP_ASM / DSP_ASM.DOC next >
Encoding:
Text File  |  1995-01-01  |  5.4 KB  |  227 lines

  1.  
  2. -- Quick DSP assembler --   v0.04     (01.01.1995)
  3.  
  4. by Audoly Gilles
  5. (crazy programmer, that works on 1st january !!!!!)
  6.  
  7.  
  8. This program was done because the assembler given by ATARI is too slow.
  9. As nobody else tried to make one in assembly, I did. 
  10. (well, the first version was avaible in november 1993 ...)
  11. This assembler is nearly 30 times faster than ASM56000.TTP+DSPLNK+CLD2LOD.
  12. It is 20 times smaller too, and my version isn't really 20 times lower.
  13. Who said that assembly is useless, because C can do as good ?
  14. The speed test was done with a complete 3000 lines source.
  15.  
  16. This program is not supposed to replace ASM56000.TTP coded in C by Motorola.
  17. I don't know perfectly the  DSP. You must sometime assemble your program
  18. with ASM56000, to check if mine didn't miss a bugg.
  19.  
  20. Often, when you make a mistake, the program doesn't tell you, and correct
  21. it, as it's easier that way: I wanted to code as fast as possible a version
  22. able to assemble a program, but, be patient, and wait for a next version.
  23. Please remember, that I'm not payed to do this job. I'm coding it anytime
  24. I'm bored with my main programs (the serious ones). Then, you must excuse
  25. the low quality of this program, and the time to wait for a new version.
  26. This program was specially made for me, and my big dsp routine (3000 lines)
  27. I'm working on. (Do you know what 5 minutes waiting means ?)
  28.  
  29.  
  30.  
  31. -- example --
  32.  
  33. _how to assemble:
  34. open "qdsp_asm.ttp"
  35. command line: "file.asm"
  36.  
  37. _how to use it:
  38.     ...
  39.     ...
  40.     ...
  41. Dsp_ExecProg: MACRO        ;#codeptr.L,#codesize.L,#ability.W
  42.     move.w    \3,-(sp)
  43.     move.l    \2,-(sp)
  44.     move.l    \1,-(sp)
  45.     move.w    #$6d,-(sp)
  46.     trap    #14
  47.     lea.l    12(sp),sp
  48.     ENDM
  49.     ...
  50.     ...
  51.     ...
  52.     Dsp_ExecProg    #buff,#(ebuff-bbuff)/3,#ability
  53.     ...
  54.     ...
  55.     ...
  56. bbuff: incbin "file.p56"
  57. ebuff:
  58.     ...
  59.     ...
  60.  
  61.  
  62. in C: load it somewhere, get the file size, and execute Dsp_ExecProg.
  63.  
  64. You can use the ".lod" too, but I think the ".p56" is better, because it
  65. is smaller, and it will remain less time to execute. I think you should
  66. include in your programs, the possibility of loading ".dsp". For example:
  67. in dsp sound effects programs.
  68. ".lod" can be translated to ".p56" with the Dsp_LodToBinary function.
  69.  
  70.  
  71.  
  72. command line syntax:
  73. [n] [l] [oFILE.P56] [pFILE] FILE.ASM
  74.  
  75. example:
  76. l otest.p56 test.asm
  77.  
  78. n:        don't make '.DSP' output file
  79. l:        make a LOD output file too
  80. oFILE.P56 define an other name for output file (don't forget the extention)
  81.  
  82.  
  83.  
  84. restrictions:
  85.  _ warnings are not reported. (not even counted).
  86.  _ few assembling directives.
  87.  _ no optimisation directives.
  88.  _ ALL THE RESTRICTIONS WRITTEN IN THE DSP MANUAL ARE NOT SEEN BY THE
  89.    ASSEMBLER !! (ex1: short jsr at LA adress  ex2:rti after rep  
  90.                  EX3: use of Rn after move ??,Rn ...).
  91.  _ please don't make mistake on command line.
  92.  
  93. If you find a bugg I didn't register, it would be nice to report it.
  94.  
  95.  
  96. notes:
  97.  _ "_label" is a local label.
  98.  _ labels may be defined many times.
  99.  
  100.  
  101.  
  102. **** v0.02 improvements:
  103.  
  104.  _ double parallel move.
  105.  
  106.  _ L: memory move is now allowed.
  107.  
  108.  _ brackets in arithmetic.
  109.  
  110.  _ MACROs without parameters.
  111.    "__label" is a macro local label.
  112.  
  113.    ex:
  114.    
  115.    mac1:  MACRO
  116.           cmp  a,b
  117.           jeq  __lab0
  118.           not  a
  119.           jmp  __lab1
  120.    __lab0:
  121.           not  b
  122.    __lab1:
  123.           ENDM
  124.           
  125.           mac1
  126.           ...
  127.           mac1
  128.           ...
  129.           ...
  130.  
  131.  
  132.  
  133. **** v0.03 improvement:
  134.  
  135. _ some buggs have been fixed.
  136.  
  137.  
  138.  
  139. **** v0.04 improvements:
  140.  
  141. _ ".P56" extension is now use instead of ".DSP", as devpac dsp (and maybe
  142. others) created this normalisation.
  143.  
  144. _ bugg about use of recursive brackets is fixed. (and others, I haven't
  145. enumerated, too.)
  146.  
  147. _ assembling directives.
  148.  IF,IFNE,IFEQ,IFLE,IFLT,IFGE,IFGT,ELSE/ELSEIF,ENDC/ENDIF
  149.  
  150. _ macro WITH parameters
  151. ex:
  152.       ...
  153.       ...
  154. test: MACRO
  155.       add    \2,\1
  156.       movep  \1,X:<<HTX
  157.       ENDM
  158.       ...
  159.       ...
  160.       test   a,b
  161.       
  162.  
  163.  
  164.  
  165. note about "<" and ">":
  166. please always use ">" and "<" each time you use a constant.
  167. When you don't put it, the program take it for immediate short ("<") if the
  168. value is lower than the address where you put it (for jumps), and lower than
  169. $1000. It would be considered as absolute immediate (">"), if the adress is
  170. greater. Then, you should always use "<", and change it to ">" if the value
  171. is too big.
  172. I ask you to always use them, because, I'm not sure if I solved all the
  173. problems that may appen.
  174.  
  175.  
  176.  
  177.  
  178.  
  179. If you're ATARI developper, you can get the source of this stuff.
  180. The price : any nice source coded by you.
  181.  
  182.  
  183. For this job, I only expect gratitude, or donation if you have money to
  184. waste.
  185.  
  186.  
  187. To copy this program, you should keep those points:
  188. _ Nothing can be modified (text file, text in the program, ...)
  189. _ This text file must be given with the program.
  190. _ No kind of profit allowed. (If you wish to, you'll have to deal with me.)
  191.  
  192.  
  193.  
  194. to contact me:
  195.  
  196. AUDOLY GILLES
  197. 10, passage Segurane
  198. 06300 Nice
  199. FRANCE
  200.  
  201.  
  202. IF YOU WANT TO GET SOMETHING BACK, PLEASE SEND A STAMPED ENVELOPPE, AND A
  203. DISK FOR FILES.
  204.  
  205.  
  206. internet:
  207. audoly@orque.unice.fr DOES NOT EXIST ANY MORE !!!
  208. you can't reach me yet via email.
  209.  
  210. BBS:
  211. Gilles Audoly on BRAZIL or Zyllius
  212.  
  213.  
  214.  
  215.  
  216. small advertising:
  217.  
  218. The game MoonSpeeder is now avaible.
  219. C.L.O.E raytracer will be avaible at the end of december at the ATARI show
  220. in Paris, and all over the universe in january 1995.
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.